<?php TPL::output('global/header.tpl.htm'); ?>

<div class="bd pbd">
<!--个人中心_s-->
<div class="pfo default_personal">
  <ul class="ur">
    <li class="lr"><img  src="<?php echo get_avatar_url($this->user['uid'],'max',$this->user['avatar_file']); ?>"/></li>
    <li class="lsr">
      <p><b class="tx"><?php echo $this->user['user_name']; ?></b><span class="default_referrals"><?php echo $this->user['signature']; ?></span> </p>
      <div class="default_pro">
        <div class="default_SZ">
          <?php if ($this->user_id != $this->user['uid']) { ?>
          <a href="javascript:;" class="default_blue_but  <?php if ($this->user_follow_check) { ?> cur <?php } ?>" onclick="follow_people($(this), $(this), <?php echo $this->user['uid']; ?>); return false;"><?php if ($this->user_follow_check) { ?>取消<?php } ?>关注</a>
          <?php } ?>
		   <?php if ($this->user_id != $this->user['uid']) { ?>
          <a class="default_set" href="javascript:" title="设置" onclick="elementClickEvent.letter.default_anonymity(event);">设置</a>
          
		  <p class="default_setPosition hide"> 
		  
		  <a class="Questionfor_user" onclick="elementClickEvent.letter.moudleTips_start('<?php echo $this->user['user_name']; ?>',elementClickEvent.letter.moudle_box().questionfor_user,'<?php echo $this->user['uid'];?>');" href="javascript:;">问他问题</a> 
		 
		  <a href="javascript:;" onclick="Quick_Tips.info(this, '<?php echo $this->user['user_name']; ?>'); return false;">发私信</a>
		  <?php } ?>
		  </p>
		  
        </div>
        <?php if ($this->area_name) { ?><?php echo $this->area_name; ?> &nbsp; <?php } ?><?php if ($this->jobs_name) { ?><?php echo $this->jobs_name; ?> &nbsp; <?php } ?>
		
		 <?php if (get_setting('qq_t_enabled') == 'Y') { ?>
		 <?php if ($this->qq_weibo_url){ ?>
		 <span class="tencent"></span>
		 <?php } ?>
		 <?php } ?>		 
		  <?php if (get_setting('sina_weibo_enabled') == 'Y') { ?>
		 <?php if ($this->sina_weibo_url){ ?>
		 <span class="sina"></span>
		 <?php } ?>
		 <?php } ?>
		  </div>
      <div class="default_xjr">
      	<span class="tk_rocs fr"><em class="s"></em>个人首页被 <em class="e"><?php echo $this->user['views_count'];?></em> 人访问</span>
      	<span class="default_prestige">威望：<big><?php echo $this->user['reputation'];?></big><!--<a href="javascript:;" class="top_v2"></a>--></span> &nbsp;&nbsp; <span class="xjr xjr_zt"><b><?php echo $this->user['agree_count']; ?></b> 赞同</span> &nbsp;<span class="xjr xjr_gx"><b><?php echo $this->user['thanks_count']; ?></b> 感谢</span></div>
    </li>
  </ul>
</div>
<!--个人中心_e--> 
<!--right_nav_s-->
<div class="tommy_rightDiv xBlog_tag enTryAside">
  <ul class="i_lsitecontents">
    <li class="default_As cur"><a href="javascript:;">个人主页</a></li>
    <li class="default_As"><a href="javascript:;">回复<span class="default_s"><?php echo $this->user['answer_count'];?></span></a></li>
    <li class="default_As"><a href="javascript:;">发问<span class="default_s"><?php echo $this->user['question_count'];?></span></a></li>
    <li class="default_As"><a href="javascript:;">动态</a></li>
  </ul>
  <div class="RightListDiv default_right_div">
    <h3 class="default_As h3">关注 <span class="default_vor"  id="rbtn_more_friend"><?php echo $this->user['friend_count'];?></span> 个人</h3>
    <p class="default_GZ">
      <?php foreach($this->side_friends_list AS $key => $val) { ?>
      <a href="people/<?php echo $val['user_name']; ?>" title="<?php echo $val['user_name']; ?>" ><img src="<?php echo get_avatar_url($val['uid'],'mid',$val['avatar_file']); ?>" alt="<?php echo $val['user_name']; ?>" onMouseOver="eventsMouseM(this);"  rel="<?php echo $val['uid'];?>"/></a>
      <?php } ?>
    </p>
    <h3 class="default_As h3">关注者 <span class="default_vor" id="rbtn_more_fans"><?php echo $this->user['fans_count'];?></span> 人</h3>
    <p class="default_GZ">
      <?php foreach($this->side_fans_list AS $key => $val) { ?>
      <a href="people/<?php echo $val['user_name']; ?>" title="<?php echo $val['user_name']; ?>" ><img src="<?php echo get_avatar_url($val['uid'],'mid',$val['avatar_file']); ?>" alt="<?php echo $val['user_name']; ?>" onMouseOver="eventsMouseM(this);"  rel="<?php echo $val['uid'];?>"/></a>
      <?php } ?>
    </p>
  </div>
  <div class="RightListDiv default_right_div">
    <h3 class="default_As h3">关注了 <span class="default_vor" onclick="" id="rbtn_more_topic_focus"><?php echo $this->user['topic_focus_count'];?></span> 个话题</h3>
    <div class="newTopic">
	 <?php foreach ($this->focus_topics AS $key => $val) {?>
	<a href="topic/<?php echo $val['topic_title']; ?>" onmouseover="eventstalk(this);" rel="<?php echo $val['topic_id']; ?>"><?php echo $val['topic_title']; ?></a>
	 <?php } ?>
	 </div>
  </div>
  <div class="RightListDiv">
    <h3 class="h3">威望来源</h3>
    <ul class="anwsion_prestige_tag">

	 <?php if($this->reputation_topics){ ?>
	 <?php foreach ($this->reputation_topics AS $key => $val) {?>
      <li><a rel="<?php echo $val['topic_id'];?>" onmouseover="eventstalk(this);" href="topic/<?php echo $val['title'];?>" title="<?php echo $val['title'];?>" class="topic_vpt"><?php echo $val['title'];?></a>
        <p class="default_vpt" style="background-position:-<?php echo (100-$val['percent']);?>px 0;"><span class="default_percentage"><?php echo $val['percent'];?>%</span></p>
      </li>
 <?php } ?>
 <?php } ?>
    </ul>
  </div>
</div>
<!--right_nav_e--> 
<div id="default_block">

<!--回复_s-->
<div class="contant_left readns_discus div_select  dis_ListEntry index " id="block_1">
  <h2 class="c_title"><a  class="all_answer" href="javascript:;" onClick="window.scroll(0,0);" rel="1"  title="更多回复 »">更多回复 »</a>回复</h2>
  <div class="display_hide">
    <div class="default_divs"  id="answer_v0_index">
      <ul class="default_ul" id="contents_t0_index">
        <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
      </ul>
    </div>
	
	
  </div>
</div>
<!--回复_e--> 


<!--回复_s-->
<div class="contant_left readns_discus div_select  dis_ListEntry index hide" id="block_1b">
  <h2 class="c_title"><a  class="all_answer" href="javascript:;" onClick="window.scroll(0,0);" rel="1"  title="更多回复 »">更多回复 »</a>回复<span class="dx_rols"><?php echo $this->user['answer_count'];?><span></h2>
  <div class="display_hide">
    <div class="default_divs"  id="answer_v0">
      <ul class="default_ul" id="contents_t0">
        <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
      </ul>
    </div>
    <div class="moreDiv" id="bp_more_t0"><a href="#" title="点击查看更多>> " class="mores">更多<em></em></a></div>
  </div>
</div>
<!--回复_e-->

<!--发问_s-->
<div class="contant_left readns_discus  div_select"  id="block_2">
  <h2 class="c_title"><a  class="all_answer" href="javascript:;" onClick="window.scroll(0,0);" rel="2"  title="更多发问 »">更多发问 »</a>发问</h2>
  <div class="display_hide">
    <div class="default_divs" id="question_v0_index">
      <ul class="default_ul defa_ask" id="contents_t1_index">
        <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
      </ul>
    </div>

  </div>
</div>
<!--发问_e-->

<!--发问_s-->
<div class="contant_left readns_discus  div_select hide"  id="block_2b">
  <h2 class="c_title"><a  class="all_answer" href="javascript:;" onClick="window.scroll(0,0);" rel="2"  title="更多发问 »">更多发问 »</a>发问<span class="dx_rols"><?php echo $this->user['question_count'];?><span></h2>
  <div class="display_hide">
    <div class="default_divs" id="question_v0">
      <ul class="default_ul defa_ask" id="contents_t1">
        <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
      </ul>
    </div>
    <div class="moreDiv" id="bp_more_t1"><a href="#" title="点击查看更多>> " class="mores">更多<em></em></a></div>
  </div>
</div>
<!--发问_e-->


<!--最新动态_s-->
<div class="contant_left readns_discus  div_select dis_ListEntry index"  id="block_3">
  <h2 class="c_title"><a  class="all_answer"href="javascript:;" onClick="window.scroll(0,0);" rel="3"  title="更多动态 »">更多动态 »</a>最新动态<span class="dx_rols"><span></h2>
  <div class="display_hide">
    <div class="default_divs" id="default_divs_v0_index">
      <ul class="default_trends" id="contents0_index">
        <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
      </ul>
    </div>

  </div>
</div>
<!--最新动态_e--> 


<!--最新动态_s-->
<div class="contant_left readns_discus  div_select dis_ListEntry index hide"  id="block_3b">
  <h2 class="c_title"><a  class="all_answer"href="javascript:;" onClick="window.scroll(0,0);" rel="3"  title="更多动态 »">更多动态 »</a>最新动态<span class="dx_rols"><span></h2>
  <div class="display_hide">
    <div class="default_divs" id="default_divs_v0">
      <ul class="default_trends" id="contents0">
        <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
      </ul>
    </div>
    <div class="moreDiv" id="bp_more0"><a href="#" title="点击查看更多>> " class="mores">更多<em></em></a></div>
  </div>
</div>
<!--最新动态_e--> 
<!--关注人数_s-->

<div class="contant_left readns_discus   dis_ListEntry index hide  div_select"  id="block_4" >
  <h2 class="c_title"> <?php echo $this->user["ta"]; ?>关注了
    <?php  echo $this->user['friend_count']; ?>
    个人<span class="dx_rols"><span> </h2>
  <ul class="Lister_attentionPersonal" id="contents_g0">
    <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
  </ul>
  <div class="moreDiv" id="bp_more_g0"><a href="#" title="点击查看更多>> " class="mores">更多<em></em></a></div>
</div>

<!--关注人数_e--> 
<!--被关注_s-->

<div class="contant_left readns_discus   dis_ListEntry index hide div_select"  id="block_5" >
  <h2 class="c_title"> <?php echo $this->user["ta"]; ?>被
    <?php  echo $this->user['fans_count']; ?>
    人关注<span class="dx_rols"><span> </h2>
  <ul class="Lister_attentionPersonal" id="contents_g1">
    <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
  </ul>
  <div class="moreDiv" id="bp_more_g1"><a href="#" title="点击查看更多>> " class="mores">更多<em></em></a></div>
</div>

<!--被关注_e--> 
<!--关注的话题_s-->

<div class="contant_left readns_discus   dis_ListEntry index div_select hide"  id="block_6">
  <h2 class="c_title"> <?php echo $this->user["ta"]; ?>关注了
    <?php  echo $this->user['topic_focus_count']; ?>
    个话题<span class="dx_rols"><span> </h2>
  <ul class="Lister_attentionPersonal" id="contents_tp1">
    <p style="padding: 15px 0" align="center"><img src="<?php echo G_STATIC_URL; ?>/common/loading_b.gif" alt="" /></p>
  </ul>
  <div class="moreDiv" id="bp_more_tp1"><a href="#" title="点击查看更多>> " class="mores">更多<em></em></a></div>
</div>

<!--关注的话题_e--> 
</div>
<script type="text/javascript">
	var PEOPLE_USER_ID = '<?php echo $this->user['uid']; ?>';
	
	$(document).ready(function () {	
		 bp_more_load(G_BASE_URL + '/people/ajax/user_actions/distint-0__uid-' + PEOPLE_USER_ID, $('#bp_more0'), $('#contents0'));	// 个人动态							
		 
		 $("#contents0_index").load(G_BASE_URL + '/people/ajax/user_actions/distint-0__perpage-5__uid-' + PEOPLE_USER_ID); 
		 
		 bp_more_load(G_BASE_URL + '/people/ajax/user_actions/get_type-questions__uid-' + PEOPLE_USER_ID + '__actions-201', $('#bp_more_t0'), $('#contents_t0'));	// 参与的问题	
		 
		  $("#contents_t0_index").load(G_BASE_URL + '/people/ajax/user_actions/get_type-questions__perpage-5__uid-' + PEOPLE_USER_ID + '__actions-201'); 
		  
		 bp_more_load(G_BASE_URL + '/people/ajax/user_actions/get_type-questions__uid-' + PEOPLE_USER_ID + '__actions-101', $('#bp_more_t1'), $('#contents_t1'));	// 发起的问题	

		$("#contents_t1_index").load(G_BASE_URL + '/people/ajax/user_actions/get_type-questions__perpage-5__uid-' + PEOPLE_USER_ID + '__actions-101'); 
 		 
		 
		bp_more_load(G_BASE_URL + '/people/ajax/following/uid-' + PEOPLE_USER_ID, $('#bp_more_g0'), $('#contents_g0'));	// 我关注的人	
		bp_more_load(G_BASE_URL + '/people/ajax/followers/uid-' + PEOPLE_USER_ID, $('#bp_more_g1'), $('#contents_g1'));	// 关注我的人	
		bp_more_load(G_BASE_URL + '/people/ajax/topics/uid-' + PEOPLE_USER_ID, $('#bp_more_tp1'), $('#contents_tp1'));//我关注的话题
	});

	$(function(){
		var JF_Elements = $('.tommy_rightDiv .default_As'),
			 el = {
				 //
				JF:function(){
					for(var i=0,len=6;++i<=len;){
						
						i <= 3 ? $('#block_'+i).removeClass('hide') : $('#block_'+i).addClass('hide');
						$(JF_Elements).eq(0).addClass('cur').parent().parent().find('.default_As').eq(i).removeClass('cur');
						i <= 3 ? $('#block_'+i+'b').addClass('hide') :false;
					}
					$('.all_answer').show();
				},
				EVE_handler:function(x){
					
					x == 0 ? el.JF() : el.through_ev(x);
				},
				
				//
				through_ev : function(x){
					$(JF_Elements).each(function(i) {
						
						$('#block_'+i+'b').addClass('hide')
						if(i >0 && i == x){
							$(this).addClass('cur');
							$('#block_'+x+'b').removeClass('hide');
							if(x >3){
								$('#block_'+x).removeClass('hide')
							}else{
								$('#block_'+i).addClass('hide');
							}
						}else{
							$('#block_'+i).addClass('hide');
							$('#block_'+i+'b').addClass('hide');
							$(this).parent().parent().find('.default_As').eq(i).removeClass('cur');
						}
					});
					$('.all_answer').hide();
				},
				ev_LoadFun : function(fn){
					
					$(JF_Elements).each(function(i) {
						$(this).click(function(){
							
							if(typeof fn == 'function'&& 
							    typeof fn != 'object'){
								fn(i);
							}
						});
					
					})
				}
				
			};
			
		el.ev_LoadFun(el.EVE_handler);
		
		
		$('.all_answer').click(function(){
			var rel = $(this).attr('rel');
			$(JF_Elements).each(function(i) {
				
				$(JF_Elements).eq(rel).addClass('cur').parent().parent().find('.default_As').eq(i).removeClass('cur');
				$('#block_'+i).addClass('hide');
				$('#block_'+rel+'b').removeClass('hide').parent().find('#block_'+i+'b').addClass('hide');
				$('.all_answer').hide();
			});
			
			
		})
			
	});
</script>

<?php TPL::output('global/footer.tpl.htm'); ?>